include("inc.php");
session_start();
$id = $_COOKIE['Prime-id'];
$pass = $_COOKIE['Prime-pass'];
if($id==""){
$id=$_GET['id'];
if($id==""){
$id=$_POST['id'];
}
}
if($id==""){
if(_S == 1){
header("Location: http://www.jhayashida.co.jp/prime/index.php");
}elseif(_S == 0){
header("Location: http://localhost/public/prime/index.php");
}
exit;
}
//MySQLに接続
if(!$conn = mysql_connect(_DB_SERVER,_DB_UID,_DB_PASS)){
die('MySQL接続失敗');
}
//データベースの選択
if(!$sts = mysql_select_db(_DB_NAME,$conn)){
die('テーブル選択失敗');
}
$sqllist="";
$sqllist.="select * from member where id = '$id'";
$mqlist = mysql_query($sqllist,$conn);
if($rec = mysql_fetch_array($mqlist)){
$blogtitle = $rec['blogtitle'];
$ownerskin_id = $rec['skin_id'];
}
$artnum = $_GET['artnum'];
$sql="";
$sql.="select * from album where artnum = '$artnum' ";
$mq = mysql_query($sql,$conn);
if($rec = mysql_fetch_array($mq)){
$ownerid = _hs($rec['id']);
$Rdata = _hs($rec['date']);
$title = $rec['title'];
$category = _hs($rec['category']);
$temp = _hs($rec['temp']);
$com = $rec['com'];
$com = _EMOJI1($com);
$com = str_replace("\n","
",$com);
$img1com = $rec['img1com'];
$img2com = $rec['img2com'];
$img3com = $rec['img3com'];
}
$u1 = "${ownerid}/"."${Rdata}/"."image1".".jpg";
$u2 = "${ownerid}/"."${Rdata}/"."image2".".jpg";
$u3 = "${ownerid}/"."${Rdata}/"."image3".".jpg";
$img1flg="";
$img2flg="";
$img3flg="";
if(file_exists("$u1")){
$img1flg=1;
$percent=0;
//画像サイズ自動変更処理
list($width, $height) = getimagesize("$u1");
if($width > $height){
if($width > 180){
$percent = 180 / $width;
}
}elseif($width < $height){
if($height > 135){
$percent = 135 / $height;
}
}else{
if($width > 180){
$percent = 180 / $width;
}
if($height > 135){
$percent = 135 / $height;
}
}
if($percent > 0){
$new_width1 = $width * $percent;
$new_height1 = $height * $percent;
}else{
$new_width1 = $width;
$new_height1 = $height;
}
}
if(file_exists("$u2")){
$img2flg=1;
$percent=0;
//画像サイズ自動変更処理
list($width, $height) = getimagesize("$u2");
if($width > $height){
if($width > 180){
$percent = 180 / $width;
}
}elseif($width < $height){
if($height > 135){
$percent = 135 / $height;
}
}else{
if($width > 180){
$percent = 180 / $width;
}
if($height > 135){
$percent = 135 / $height;
}
}
if($percent > 0){
$new_width2 = $width * $percent;
$new_height2 = $height * $percent;
}else{
$new_width2 = $width;
$new_height2 = $height;
}
}
if(file_exists("$u3")){
$img3flg=1;
$percent=0;
//画像サイズ自動変更処理
list($width, $height) = getimagesize("$u3");
if($width > $height){
if($width > 180){
$percent = 180 / $width;
}
}elseif($width < $height){
if($height > 135){
$percent = 135 / $height;
}
}else{
if($width > 180){
$percent = 180 / $width;
}
if($height > 135){
$percent = 135 / $height;
}
}
if($percent > 0){
$new_width3 = $width * $percent;
$new_height3 = $height * $percent;
}else{
$new_width3 = $width;
$new_height3 = $height;
}
}
if(isset($_POST['Rsubmit'])){//データベース削除処理
$artnum=$_POST['artnum'];
$sql="";
$sql.="select * from album where artnum = '$artnum' ";
$mq = mysql_query($sql,$conn);
if($rec = mysql_fetch_array($mq)){
$Rdata = _ss(_hs($rec['date']));
}
if(!isset($Rdata)){
if(_S == 1){
header("Location: http://www.jhayashida.co.jp/prime/delmp3.php?id=$id");
}elseif(_S == 0){
header("Location: http://localhost/public/prime/delmp3.php");
}
exit;
}
$u = "${id}/"."${Rdata}";
$u1 = "${id}/"."${Rdata}/"."image1".".jpg";
$u2 = "${id}/"."${Rdata}/"."image2".".jpg";
$u3 = "${id}/"."${Rdata}/"."image3".".jpg";
if(file_exists("$u1")){
unlink("$u1");
}
if(file_exists("$u2")){
unlink("$u2");
}
if(file_exists("$u3")){
unlink("$u3");
}
if(file_exists("$u")){
rmdir("$u");
}
$sql = "";
$sql.= "DELETE FROM album WHERE artnum='$artnum'";
mysql_query($sql,$conn);
$fda = 0;
$fdss = 17-$fda;
$sqllist="";
$sqllist.="select `id` , `title` , `artnum` from `album` where `ex` = '1' ";
$sqllist.="order by `date` desc ";
$sqllist.= "limit 0,$fdss ";
$lst="";
$mqlist = mysql_query($sqllist,$conn);
while($rec = mysql_fetch_array($mqlist)){
$artnumdd=_hs($rec['artnum']);
$titledd=_hs($rec['title']);
$iddd=_hs($rec['id']);
$numnumdd=0;
$sqlcomnum="";
$sqlcomnum.="select count(artnum) as numnum from comment where artnum = '$artnumdd' ";
//echo "$sqlcomnum"."
";
$mqlcomnum = mysql_query($sqlcomnum,$conn);
while($recnum = mysql_fetch_array($mqlcomnum)){
$numnumdd=$recnum['numnum'];
}
$lst.="
|
プライムブログ社 Copyright (C) 2006 Prime Blog Co. All Rights Reserved. |